<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script type="module">
    import { reactive } from "./03_reactive.js";
    import { ref } from "./03_ref.js";
    const state = reactive({
      a: 2,
      b: {
        c: 'abc'
      }
    })
    // console.log(state, state.b)
    // console.log(state.a, state.b.c)

    // state.a = 3
    // state.b.c = 'cba'
    // state.d = true

    // delete state.a
    // console.log(state.a)


    // const count = ref(2)
    // console.log(count.value)
    // count.value = 3
    // console.log(count.value)

    const user = ref({
      name: 'tom',
      age: 12
    })
    // console.log(user.value.age)
    user.value.age = 13

  </script>
</body>
</html>